package com.google.code.sprite.util;

public class ValidatorBuilder {

    public static String getValidators(String type, boolean nullable, boolean isKey) {
        StringBuilder sb = new StringBuilder();
        if (!isKey && !nullable) {
            sb.append("required");
        }
        if (type.equals("num")) {
            sb.append(",num");
        } else if (type.equals("date")) {
            sb.append(",date");
        }
        return sb.toString();
    }

}
